﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using RouterControl.Whs.SingletonService;

namespace RouterControl.WhsAddIn.ConsoleControls
{
	public partial class ConsoleControlBase : UserControl
	{
		protected readonly log4net.ILog _log;
        protected readonly SingletonService2Factory _singletonService = new SingletonService2Factory();
		protected readonly RouterControlConsoleTab2 _tab;

		/// <summary>
		/// for designer only
		/// </summary>
		[Obsolete("for designer only")]
		internal ConsoleControlBase()
		{
			InitializeComponent();
		}

		public ConsoleControlBase(RouterControlConsoleTab2 tab)
		{
			if (tab == null)
				throw new ArgumentNullException("tab");

			_tab = tab;

			if (System.ComponentModel.LicenseManager.UsageMode != System.ComponentModel.LicenseUsageMode.Designtime)
			{
				_log = Logging.LogFactory.Instance.GetLog(GetType());
			}

			InitializeComponent();
		}
	}
}
